Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
tonal-midi
Advanced tools
tonal-midi
is a collection of functions to convert between midi numbers and note names.
This is part of tonal music theory library.
You can install via npm: npm i --save tonal-midi
Boolean
Test if the given number is a valid midi note number
Integer
Get midi number for a pitch
String
Given a midi number, returns a note name. The altered notes will have flats.
String
Given a midi number, returns a note name. The altered notes will have sharps.
Boolean
Test if the given number is a valid midi note number
Kind: global function
Returns: Boolean
- true if it's a valid midi note number
Param | Type | Description |
---|---|---|
num | Object | the thing to be tested |
Integer
Get midi number for a pitch
Kind: global function
Returns: Integer
- the midi number or null if not valid pitch
Param | Type | Description |
---|---|---|
pitch | Array | String | the pitch |
Example
midi('C4') // => 60
String
Given a midi number, returns a note name. The altered notes will have flats.
Kind: global function
Returns: String
- the note name
Param | Type | Description |
---|---|---|
midi | Integer | the midi note number |
Example
tonal.fromMidi(61) // => 'Db4'
String
Given a midi number, returns a note name. The altered notes will have sharps.
Kind: global function
Returns: String
- the note name
Param | Type | Description |
---|---|---|
midi | Integer | the midi note number |
Example
tonal.fromMidiS(61) // => 'C#4'
FAQs
Conversion between midi numbers and note names
The npm package tonal-midi receives a total of 0 weekly downloads. As such, tonal-midi popularity was classified as not popular.
We found that tonal-midi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.